<?php
$sql="
DROP TABLE IF EXISTS `ims_xuan_hb_ziliao`;
CREATE TABLE IF NOT EXISTS `ims_xuan_hb_ziliao` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `content` text NOT NULL,
  `createtime` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `ims_xuan_hb_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10)  NOT NULL DEFAULT '0' COMMENT '所属帐号',
  `name` varchar(50) NOT NULL COMMENT '分类名称',
  `thumb` varchar(255) NOT NULL COMMENT '分类图片',
  `thumb2` varchar(255) NOT NULL COMMENT '分类图片',
  `parentid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上级分类ID,0为第一级',
  `sheding` text,
  `description` varchar(500) NOT NULL COMMENT '分类介绍',
  `displayorder` tinyint(3)  NOT NULL DEFAULT '0' COMMENT '排序',
  `enabled` tinyint(1)  NOT NULL DEFAULT '1' COMMENT '是否开启',
  PRIMARY KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ims_xuan_hb_poster_data`;
CREATE TABLE IF NOT EXISTS `ims_xuan_hb_poster_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) NOT NULL,
  `name` varchar(30) NOT NULL,
  `category` int(11) NOT NULL,
  `createtime` varchar(255) NOT NULL,
  `view` varchar(255) NOT NULL,
  `enabled` tinyint(1)  NOT NULL DEFAULT '1' COMMENT '是否发布',
  `ext_info` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
";

pdo_run($sql);